package oo2;

public class Jiaowuchu {
	String wname;

	public void inc(int a) {
		a++;
		System.out.println(wname + "认为明年你是" + a + "岁了");
	}

	public int inc3(int a) {
		a++;
		System.out.println(wname + "认为明年你是" + a + "岁了");
		return a;
	}

	public void inc2(Student s) {
		s.age++;
		System.out.println(wname + "查看学员的信息");
		s.show();
	}

	// 平均分少于60,则集体涨两份
	public void inc4(Student[] s) {
		int num = 0;
		for (int i = 0; i < s.length; i++) {
			num += s[i].score;
		}
		int avg = num / s.length;
		if (avg < 60) {
			for (int i = 0; i < s.length; i++) {
				s[i].score += 2;
			}
		}
	}
}
